<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" href="./css/proced.css">
	</head>
	<body>
		<div class="index">
			<header>
				<div class="box1">
					<img src="./static/proced/1699863152829.jpg"></img>
				</div>
				
				<div class="box2">
					<div class="title">
						<div>近期动态</div>
						<div style="color: #999;font-size: 24+10px;">全部(1条) ></div>
					</div>
					<div class="ge">
						<div class="t1">
							<img src="./static/proced/1699863256563.jpg" mode=""></img>
						</div>
						<div class="t2">
							<div>小程序专属福利</div>
							<div class="tt2">
								<img src="./static/proced/1699863276676.jpg" mode=""></img>
								天天领福利
							</div>
						</div>
						<div class="t3">
							去领取
						</div>
					</div>
				</div>
			</header>
			
			<main>
				<div class="title">
					<span class="xuanZho">最近使用</span>
					<span class="t1">我的收藏</span>
					<span class="t2">更多></span>
				</div>
				
				<div class="box1 box6"></div>

				<div class="box2">
					<img src="./static/proced/1699865477287.jpg" mode=""></img>
				</div>
			</main>
			
			<div class="footer">
				<div>
					<a href="./home.html">首页</a> 
				</div>
				<div>
					<a href="./procedure.html">朋友</a> 
				</div>
				<div>
					<img src="./static/proced/1699865786832.jpg" alt="">
				</div>
				<div>
					<a href="./message.html">消息</a> 
				</div>
				<div>
					<a href="./user.html">我的</a> 
				</div>
			</div>
		</div>
	</body>
	<script>
		var url=`http://rap2api.taobao.org/app/mock/315703/doyin.procedure`;

		var str="";
		const xhr = new XMLHttpRequest();
		xhr.open('GET', './json/3.json', true);
		xhr.onreadystatechange = function() {
		if (xhr.readyState === 4 && xhr.status === 200) {
			const jsonData = JSON.parse(xhr.responseText);

			console.log(jsonData.arr)
			// 处理返回的 JSON 数据
			for(let item of jsonData.arr){
                str+=`<div class="boxx1">
					<img src="${item.img}" mode=""></img>${item.name}
					</div>`
			}
			document.getElementsByClassName("box6")[0].innerHTML=str
		}
		};
		xhr.send();
	</script>
</html>